import { createApp } from "vue";
import Router from "./router";
import Store from "./store";
import App from "./App.vue";
import { permission } from "./directives/permission";
import LayJsonSchemaForm from "@layui/json-schema-form";
import "@layui/json-schema-form/lib/index.css";

window.addEventListener("error", (event) => {
  console.log("Window addEventListener Error:" + event);
});

const app = createApp(App);
app.directive("permission", permission);
app.use(LayJsonSchemaForm);

app.use(Store);
app.use(Router);

app.mount("#app");
